﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="AnyOffice.general.report.info.index" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
	<head>
		<title></title>
		
		<link rel="stylesheet" type="text/css" href="/module/date_selector/popcalendar.css"/>
		<script type="text/javascript" src="/module/date_selector/popcalendar.js"></script>
		<script type="text/javascript" src="/aspnet_client/core/function.js"></script>
	<script type="text/javascript" language="javascript">
	    function open_week(report_id) {
	        // URL="read_week.aspx?report_id="+report_id;
	        // myleft=(screen.availWidth-500)/2;
	        // mytop=150
	        // mywidth=600;
	        // myheight=500;
	        // window.open(URL,"read_report","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");


	        var mwidth = "600";
	        var mheight = "450";
	        var loc_x = parseInt((window.screen.width - mwidth) / 2);
	        var loc_y = parseInt((window.screen.height - mwidth) / 2);

	        var _oParameter = new Object();
	        _oParameter.dialogTitle = "月度查询";
	        _oParameter.openFile = "read_week.aspx?report_id=" + report_id + "&num=" + Math.random();

	        window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');





	    }

	    function open_month(report_id) {
	        // URL="read_month.aspx?report_id="+report_id;
	        // myleft=(screen.availWidth-500)/2;
	        // mytop=150
	        // mywidth=600;
	        // myheight=500;
	        // window.open(URL,"read_report","height="+myheight+",width="+mywidth+",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+mytop+",left="+myleft+",resizable=yes");

	        var mwidth = "600";
	        var mheight = "450";
	        var loc_x = parseInt((window.screen.width - mwidth) / 2);
	        var loc_y = parseInt((window.screen.height - mwidth) / 2);

	        var _oParameter = new Object();
	        _oParameter.dialogTitle = "月度查询";
	        _oParameter.openFile = "read_month.aspx?report_id=" + report_id + "&num=" + Math.random();

	        window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');







	    }

	    function open_year(report_id) {
	        //    URL = "read_year.aspx?report_id=" + report_id;
	        //    myleft = (screen.availWidth - 500) / 2;
	        //    mytop = 150
	        //    mywidth = 600;
	        //    myheight = 500;
	        //    window.open(URL, "read_report", "height=" + myheight + ",width=" + mywidth + ",status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top=" + mytop + ",left=" + myleft + ",resizable=yes");


	        var mwidth = "600";
	        var mheight = "450";
	        var loc_x = parseInt((window.screen.width - mwidth) / 2);
	        var loc_y = parseInt((window.screen.height - mwidth) / 2);

	        var _oParameter = new Object();
	        _oParameter.dialogTitle = "月度查询";
	        _oParameter.openFile = "read_year.aspx?report_id=" + report_id + "&num=" + Math.random();

	        window.showModalDialog('shDialog.htm', _oParameter, 'dialogHeight:' + mheight + 'px;dialogWidth:' + mwidth + 'px;dialogLeft:' + loc_x + ';dialogTop:' + loc_y + ';help:no;status:no;scroll:yes;titlebar:no;toolbar:no');
             

	    }


	    function CheckForm() {
	        var slt = document.getElementById("ddlProductName");
	        if (slt.value == "") {
	            alert("请选择所属项目！");
	            return (false);
	        }

	        return true;
	    }
		</script>
	</head>
	<body class="bodycolor" topmargin="5">
		<form id="Form1" method="post" runat="server">		
         <div class="main_div">	
		<asp:Panel id="pnlDiary" runat="server" >
			<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<TR>
					<TD class="tab_ti">工作汇报查询</TD>
				</TR>
			</TABLE>
				<TABLE width="500" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
					 <TR>
						<TD class="ta_bg" noWrap>所属项目：</TD>
						<TD class="ta_txt">
                             <asp:DropDownList ID="ddlProductName" Width="300px" runat="server">
                            </asp:DropDownList>
                        </TD>
					</TR>
                    <TR>
						<TD class="ta_bg" noWrap>所属年份：</TD>
						<TD class="ta_txt"> 
                         <asp:DropDownList ID="ddYear" runat="server" Width="200px">
                            </asp:DropDownList>
						</TD>
					</TR>
					<TR>
						<TD class="ta_bg" noWrap>所属月份：</TD>
						<TD class="ta_txt">
                             <asp:DropDownList ID="ddlMonth" runat="server" Width="200px">
                            </asp:DropDownList> 
						</TD>
					</TR>
				
					<TR>
						<TD class="bnt_con" noWrap align="center" colSpan="2"><INPUT class="bnt01" title="进行查询" onClick="return CheckForm();" type="submit" value="查 询"
								name="button">
						</TD>
					</TR>
				</TABLE>
			</asp:Panel>
			<asp:Panel id="pnlResult" runat="server" Visible="False">
			<TABLE class="small" cellSpacing="0" cellPadding="3" width="100%" border="0">
				<TR>
					<TD class="tab_ti">工作汇报查询结果</TD>
				</TR>
			</TABLE>
			
				<asp:Repeater id="rptQuery" runat="server" EnableViewState="False">
					<HeaderTemplate>
						<table width="100%" cellSpacing="0" cellPadding="0" border="0" class="tab_pub" align="center">
							<tr>
								<td nowrap class="TableHeader" align="center" width="30%">标题</td>
								<td nowrap class="TableHeader" align="center">类型</td>
								<td nowrap class="TableHeader" align="center">申请人</td>
								<td nowrap class="TableHeader" align="center">填写时间</td>								
								<td nowrap class="TableHeader" align="center">操作</td>
							</tr>
					</HeaderTemplate>
					<ItemTemplate>
						<tr class="TableLine1">
							<td>
								<a href="javascript:open_month('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<a href="javascript:open_month('<%#Eval("ReportId")%>');">点评</a>
							</td>						
						</tr>
					</ItemTemplate>	
					<AlternatingItemTemplate>
					<tr class="TableLine2">
							<td>
								<a href="javascript:open_month('<%#Eval("ReportId")%>');"><%#Eval("Title")%></a>
							</td>
							<td nowrap align="center"><%#getTypeNameByTypeID(Eval("Type").ToString())%></td>
							<td nowrap align="center"><u title="部门：<%#Eval("DeptName")%>" style="CURSOR:hand"><%#Eval("UserName")%></u></td>
							<td nowrap align="center"><%#Convert.ToDateTime(Eval("ReportTime").ToString()).ToString("yyyy-MM-dd")%></td>
							<td nowrap align="center">
								<a href="javascript:open_month('<%#Eval("ReportId")%>');">点评</a>
							</td>						
						</tr>
					</AlternatingItemTemplate>
					<FooterTemplate>
						</table>
					</FooterTemplate>
				</asp:Repeater>
				<asp:Literal id="litMessage" runat="server"></asp:Literal>
				<BR>
				<div align="center">
                    <asp:Button ID="btnexcel" runat="server" OnClick="btnSubmit_Click" class="BigButton" Text="数据导出" /> <INPUT class="BigButton" onClick="location='index.aspx';" type="button" value="返回">
				</div>
			</asp:Panel>	
            </div>		
		</form>
	</body>
</html>

